package controlLayer;
import modelLayer.*;


public class PersonCtrl {
    
    private PersonContainer personContainer;
    
    public PersonCtrl() {
        personContainer = PersonContainer.getInstance();
    }
    
    public void createPerson(String name, String address, int postalCode, String city, String phone) {
        Person person = new Person(name, address, postalCode, city, phone);
        personContainer.addPerson(person);
    }
    
    public Person findPerson(String phone) {
        Person p = personContainer.findPerson(phone);
        return p;
    }
    
    public void removePerson(Person p) {
        personContainer.removePerson(p);
    }
}
